import request from "@/utils/request";

// 查询课程详情列表
export function listCourseDetail(query) {
  return request({
    url: "/project/courseDetail/list",
    method: "get",
    params: query,
  });
}

// 查询课程详情详细
export function getCourseDetail(id) {
  return request({
    url: "/project/courseDetail/" + id,
    method: "get",
  });
}

// 新增课程详情
export function addCourseDetail(data) {
  return request({
    url: "/project/courseDetail",
    method: "post",
    data: data,
  });
}

// 配置资源
export function configCurriculum(data) {
  return request({
    url: "/project/courseDetail/config",
    method: "post",
    data: data,
  });
}

// 配置教师
export function configTeacher(data) {
  return request({
    url: "/project/courseDetail/config/teacher",
    method: "post",
    data: data,
  });
}

// 修改课程详情
export function updateCourseDetail(data) {
  return request({
    url: "/project/courseDetail",
    method: "put",
    data: data,
  });
}

// 删除课程详情
export function delCourseDetail(id) {
  return request({
    url: "/project/courseDetail/" + id,
    method: "delete",
  });
}
